﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MolyQR
{
    public class CurrentContext
    {
        public int CurrentStep { get; set; } = 0;

        private bool _canGoBack;
        public bool CanGoBack
        {
            get => _canGoBack;
            set
            {
                _canGoBack = value;
                CanGoBackChanged?.Invoke(this, new BoolStateChangedEventArgs{CurrentState = value});
            }
        }

        private bool _canGoForth;

        public bool CanGoForth
        {
            get => _canGoForth;
            set
            {
                _canGoForth = value;
                CanGoForthChanged?.Invoke(this,new BoolStateChangedEventArgs{CurrentState = value});
            }
        }

        public event EventHandler<BoolStateChangedEventArgs> CanGoBackChanged;
        public event EventHandler<BoolStateChangedEventArgs> CanGoForthChanged;
    }

    public class BoolStateChangedEventArgs : EventArgs
    {
        public bool CurrentState { get; set; }
    }
}
